package com.zhou.mango.sharting;

import org.jfaster.mango.sharding.TableShardingStrategy;

/**
 * @author Mr.zhou
 */
public class OrderTableShardingStrategy implements TableShardingStrategy<Integer> {
    @Override
    public String getTargetTable(String table, Integer uid) {
        int num = uid <= 1000 ? 1 : 2;
        return table + "_" + num;
    }
}
